3.1.4 \(\int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx\)

Optimal. Leaf size=108 \[ -\frac {(b c-a d) \log (c+d x)}{(d e-c f) (d g-c h)}+\frac {(b e-a f) \log (e+f x)}{(d e-c f) (f g-e h)}-\frac {(b g-a h) \log (g+h x)}{(d g-c h) (f g-e h)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.037, Rules used = {148} \begin {gather*} -\frac {(b c-a d) \log (c+d x)}{(d e-c f) (d g-c h)}+\frac {(b e-a f) \log (e+f x)}{(d e-c f) (f g-e h)}-\frac {(b g-a h) \log (g+h x)}{(d g-c h) (f g-e h)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)/((c + d*x)*(e + f*x)*(g + h*x)),x]

[Out]

-(((b*c - a*d)*Log[c + d*x])/((d*e - c*f)*(d*g - c*h))) + ((b*e - a*f)*Log[e + f*x])/((d*e - c*f)*(f*g - e*h))
 - ((b*g - a*h)*Log[g + h*x])/((d*g - c*h)*(f*g - e*h))

Rule 148

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x), x], x] /; FreeQ[{a, b, c, d, e, f, g
, h, m}, x] && (IntegersQ[m, n, p] || (IGtQ[n, 0] && IGtQ[p, 0]))

Rubi steps

\begin {align*} \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx &=\int \left (\frac {d (-b c+a d)}{(d e-c f) (d g-c h) (c+d x)}+\frac {f (-b e+a f)}{(d e-c f) (-f g+e h) (e+f x)}+\frac {h (-b g+a h)}{(d g-c h) (f g-e h) (g+h x)}\right ) \, dx\\ &=-\frac {(b c-a d) \log (c+d x)}{(d e-c f) (d g-c h)}+\frac {(b e-a f) \log (e+f x)}{(d e-c f) (f g-e h)}-\frac {(b g-a h) \log (g+h x)}{(d g-c h) (f g-e h)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 102, normalized size = 0.94 \begin {gather*} \frac {(b c-a d) \log (c+d x) (f g-e h)-(b e-a f) (d g-c h) \log (e+f x)+(b g-a h) (d e-c f) \log (g+h x)}{(d e-c f) (d g-c h) (e h-f g)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)/((c + d*x)*(e + f*x)*(g + h*x)),x]

[Out]

((b*c - a*d)*(f*g - e*h)*Log[c + d*x] - (b*e - a*f)*(d*g - c*h)*Log[e + f*x] + (d*e - c*f)*(b*g - a*h)*Log[g +
 h*x])/((d*e - c*f)*(d*g - c*h)*(-(f*g) + e*h))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a + b*x)/((c + d*x)*(e + f*x)*(g + h*x)),x]

[Out]

IntegrateAlgebraic[(a + b*x)/((c + d*x)*(e + f*x)*(g + h*x)), x]

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [A]  time = 1.14, size = 162, normalized size = 1.50 \begin {gather*} \frac {{\left (b c d - a d^{2}\right )} \log \left ({\left | d x + c \right |}\right )}{c d^{2} f g - c^{2} d f h - d^{3} g e + c d^{2} h e} + \frac {{\left (a f^{2} - b f e\right )} \log \left ({\left | f x + e \right |}\right )}{c f^{3} g - d f^{2} g e - c f^{2} h e + d f h e^{2}} - \frac {{\left (b g h - a h^{2}\right )} \log \left ({\left | h x + g \right |}\right )}{d f g^{2} h - c f g h^{2} - d g h^{2} e + c h^{3} e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="giac")

[Out]

(b*c*d - a*d^2)*log(abs(d*x + c))/(c*d^2*f*g - c^2*d*f*h - d^3*g*e + c*d^2*h*e) + (a*f^2 - b*f*e)*log(abs(f*x
+ e))/(c*f^3*g - d*f^2*g*e - c*f^2*h*e + d*f*h*e^2) - (b*g*h - a*h^2)*log(abs(h*x + g))/(d*f*g^2*h - c*f*g*h^2
 - d*g*h^2*e + c*h^3*e)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 179, normalized size = 1.66 \begin {gather*} \frac {a d \ln \left (d x +c \right )}{\left (c f -d e \right ) \left (c h -d g \right )}-\frac {a f \ln \left (f x +e \right )}{\left (c f -d e \right ) \left (e h -f g \right )}+\frac {a h \ln \left (h x +g \right )}{\left (c h -d g \right ) \left (e h -f g \right )}-\frac {b c \ln \left (d x +c \right )}{\left (c f -d e \right ) \left (c h -d g \right )}+\frac {b e \ln \left (f x +e \right )}{\left (c f -d e \right ) \left (e h -f g \right )}-\frac {b g \ln \left (h x +g \right )}{\left (c h -d g \right ) \left (e h -f g \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x)

[Out]

1/(c*f-d*e)/(c*h-d*g)*ln(d*x+c)*a*d-1/(c*f-d*e)/(c*h-d*g)*ln(d*x+c)*b*c+1/(c*h-d*g)/(e*h-f*g)*ln(h*x+g)*a*h-1/
(c*h-d*g)/(e*h-f*g)*ln(h*x+g)*b*g-1/(c*f-d*e)/(e*h-f*g)*ln(f*x+e)*a*f+1/(c*f-d*e)/(e*h-f*g)*ln(f*x+e)*b*e

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 134, normalized size = 1.24 \begin {gather*} -\frac {{\left (b c - a d\right )} \log \left (d x + c\right )}{{\left (d^{2} e - c d f\right )} g - {\left (c d e - c^{2} f\right )} h} + \frac {{\left (b e - a f\right )} \log \left (f x + e\right )}{{\left (d e f - c f^{2}\right )} g - {\left (d e^{2} - c e f\right )} h} - \frac {{\left (b g - a h\right )} \log \left (h x + g\right )}{d f g^{2} + c e h^{2} - {\left (d e + c f\right )} g h} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="maxima")

[Out]

-(b*c - a*d)*log(d*x + c)/((d^2*e - c*d*f)*g - (c*d*e - c^2*f)*h) + (b*e - a*f)*log(f*x + e)/((d*e*f - c*f^2)*
g - (d*e^2 - c*e*f)*h) - (b*g - a*h)*log(h*x + g)/(d*f*g^2 + c*e*h^2 - (d*e + c*f)*g*h)

________________________________________________________________________________________

mupad [B]  time = 4.17, size = 127, normalized size = 1.18 \begin {gather*} \frac {\ln \left (e+f\,x\right )\,\left (a\,f-b\,e\right )}{c\,f^2\,g+d\,e^2\,h-c\,e\,f\,h-d\,e\,f\,g}+\frac {\ln \left (g+h\,x\right )\,\left (a\,h-b\,g\right )}{c\,e\,h^2+d\,f\,g^2-c\,f\,g\,h-d\,e\,g\,h}+\frac {\ln \left (c+d\,x\right )\,\left (a\,d-b\,c\right )}{d^2\,e\,g+c^2\,f\,h-c\,d\,e\,h-c\,d\,f\,g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)/((e + f*x)*(g + h*x)*(c + d*x)),x)

[Out]

(log(e + f*x)*(a*f - b*e))/(c*f^2*g + d*e^2*h - c*e*f*h - d*e*f*g) + (log(g + h*x)*(a*h - b*g))/(c*e*h^2 + d*f
*g^2 - c*f*g*h - d*e*g*h) + (log(c + d*x)*(a*d - b*c))/(d^2*e*g + c^2*f*h - c*d*e*h - c*d*f*g)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x)

[Out]

Timed out

________________________________________________________________________________________